package com.app.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.sql.Timestamp;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("lm_article")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ArticleModel {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private String coverImage; //封面url
    private String title;//标题
    private String introduction;//简介
    private String content;//文章内容
    private Integer status;//状态
    private Integer sort;//排序
    private Integer type;//文章类型  22:农村经营主体
    private Integer cooperativeType;//合作社类型  1.专业大户   2.家庭农场  3.农民合作社  4 农业企业
    @TableField(exist = false)
    private String typeText;
//    private Integer township;
    @TableField(exist = false)
    private String townshipText;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Timestamp createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Timestamp updateTime;

}
